package nl.saxion.dbi.model;

import java.util.List;

import lombok.Data;

@Data
public class Key implements StringBasedPropertyAble
{

	private int id;

	private String naam;

	private boolean isUnique;

	private List<KeyVeld> velden;

	@Override
	public Object getProperty(String property)
	{
		switch (property)
		{
		case "id":
			return id;
		case "naam":
			return naam;
		case "is_unique":
			return isUnique;
		case "velden":
			return velden;
		}
		throw new IllegalStateException("Property " + property + " is niet geldig voor Key");
	}

}
